<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>直方图</title>
</head>
<body>

<script src="../node_modules/d3/build/d3.js"></script>
<script>
  //1.生成数据
  let data = d3.range(100).map(d3.randomBates(100));
  // 2.处理数据
  let histogram = d3.histogram()
    .domain([-50,50]); //区间范围
  let d = histogram(data);



</script>
</body>
</html>